<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../js/vue-2.4.0.js"></script>
    <script src="../js/vue-resource-1.3.4.js"></script>
</head>
<body>
    <div id="#app">

      <input type="button" value="get" @click="git">
      <input type="button" value="post" @click="pit">
    </div>
             
</body>
<script>
      var vu = new Vue({
          el:"#app",
          data:{

          },
          methods:{
            //   git(){
            //       this.$http.get('http://vue.studyit.io/api/getlunbo').then(function(res){
            //           console.log(res.body)
            //         //   console.log(1)
            //       })
            //   },
              pit(){
                  this.$http.post('http://vue.studyit.io/api/post',{},{ emulateJSON:true }).then(result=>{
                    console.log(result.body)
                    console.log(1)
      })
              }
          },
          
         
      })
</script>
</html>